﻿#region USING STATEMENTS
using System;
#endregion

#region CODE BODY
namespace Fusion.Interface
{
    public class BaseControl
    {
        //////////////////////////////////////////////////
        // Events & Delegates
        //////////////////////////////////////////////////
        public delegate void dMouseMove();
        public event dMouseMove MouseMove;

        public delegate void dMouseDown();
        public event dMouseDown MouseDown;

        public delegate void dControlPressed();
        public event dControlPressed Pressed;

        //////////////////////////////////////////////////
        // Constructors
        //////////////////////////////////////////////////
        public BaseControl() { }

        //////////////////////////////////////////////////
        // Methods
        //////////////////////////////////////////////////
        public virtual void Update(Single Delta) { }
        public virtual void Render(Single Delta) { }
        public virtual void Dispose() { }
        protected void ExecuteMouseMove()
        {
            if (MouseMove != null)
                MouseMove();
        }
        protected void ExecuteMouseDown()
        {
            if (MouseDown != null)
                MouseDown();
        }
        protected void ExecuteControlPressed()
        {
            if (Pressed != null)
                Pressed();
        }
    }
}
#endregion

//////////////////////////////////////////////////////////////////////////////////////////////
// Copyright 2012 Jeffery Thomas Sventora
//////////////////////////////////////////////////////////////////////////////////////////////